
"""离线脚本"""
import base
from web import models

# 建立免费版的价格策略
def run():
    exists = models.PricePolicy.objects.filter(category=1,title='个人免费版').exists()
    if not exists:
        models.PricePolicy.objects.create(
            category=1,
            title='个人免费版',
            price=0,
            project_num=5,
            project_member=2,
            project_space=20,
            per_file_size=5
        )

    models.PricePolicy.objects.create(
        title='普通用户',
        price=100,
        project_num=50,
        project_member=10,
        project_space=10,
        per_file_size=500,
        category=2
    )
    models.PricePolicy.objects.create(
        title='VIP用户',
        price=200,
        project_num=150,
        project_member=110,
        project_space=1024,
        per_file_size=500,
        category=2
    )
    models.PricePolicy.objects.create(
        title='SVIP用户',
        price=500,
        project_num=500,
        project_member=300,
        project_space=4096,
        per_file_size=5000,
        category=2
    )

if __name__ == '__main__':
    run()












